package com.dongdongshop.enums;

public enum ResultEnums {

    //登录返回信息
    LOGIN_SUCCESS(100,"登录成功"),
    LOGIN_ERRORNAME(101,"账号不存在或密码错误"),
    LOGIN_ERRORPASSWORD(102,"密码错误"),

    LOGIN_EXCEPTION(103,"账户状态异常"),

    //注册返回信息
    REGISTER_SUCCESS(200,"注册成功"),
    REGISTER_ERRORNAME(201,"账号已存在"),
    REGISTER_ERROR(202,"注册失败"),

    //全能返回信息
    SUCCESS(10000,"操作成功"),
    ERROR(99999,"操作失败"),
    MESSAGE(88888,"验证码错误"),

    //细节返回信息
    //查询返回
    SHOW_SUCCESS(1,"查询成功"),
    SHOW_ERROR(-1,"查询失败"),

    //添加返回
    ADD_SUCCESS(2,"添加成功"),
    ADD_ERROR(-2,"添加失败"),

    //修改返回
    UPDATE_SUCCESS(3,"修改成功"),
    UPDATE_ERROR(-3,"修改失败"),

    //删除返回
    DELETE_SUCCESS(4,"删除成功"),
    DELETE_ERROR(-4,"删除失败"),
    DELETE_ERRORBYZI(-41,"删除失败,请先删除分类下的内容"),

    //回显返回
    ECHO_SUCCESS(5,"回显成功"),
    ECHO_ERROR(-5,"回显失败"),

    //回显返回
    UPLIOAD_SUCCESS(6,"图片上传成功"),
    UPLIOAD_ERROR(-6,"图片上传失败"),

    //回显返回
    SENDMESSAGE_SUCCESS(7,"获取验证码成功"),
    SENDMESSAGE(-7,"获取验证码失败"),

    INEFFECTIVE(-8,"无效的token"),

    TOO_MANY_REQUEST(10022, "请求过多,请稍后重试"),
    FALLBACK(10023, "触发降级");

    private Integer num;
    private String name;

    ResultEnums(Integer num, String name) {
        this.num = num;
        this.name = name;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
